package cn.zebra.dev.member.module.client.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Getter
@Setter
@ToString
public class RegisterVO {
    @ApiModelProperty("注册手机号")
    @NotBlank(message = "请输入注册手机号")
    @Pattern(regexp = "0?1[0-9]{10}", message = "请输入正确的手机号!")
    private String phone;

    @ApiModelProperty("短信验证码")
    @NotBlank(message = "请输入短信验证码")
    private String code;

    @ApiModelProperty("登录密码")
    @NotBlank(message = "请输入登录密码")
    @Length(max = 20, message = "密码不能超出20的长度!")
    private String password;

    @ApiModelProperty("用户邀请码")
    @Length(min = 6, max = 6, message = "邀请码必须为6位长度!")
    private String memberCode;
}
